package com.hzw.saas.api.hpc.enums;

import java.util.Objects;

/**
 * @author sonam
 * @sine 2021/11/25 4:05 下午
 */
public enum HpcProviderType {
    QY("DN02", "青云账号"),
    BX("DQ01", "并行账号"),
    ;
    private final String value;
    private final String text;

    HpcProviderType(String value, String text) {
        this.value = value;
        this.text = text;
    }

    public String value() {
        return value;
    }

    public String text() {
        return text;
    }

    public static HpcProviderType text(String value) {
        for (HpcProviderType hpcProviderType : HpcProviderType.values()) {
            if (Objects.equals(hpcProviderType.value, value)) {
                return hpcProviderType;
            }
        }
        return null;
    }

    public static HpcProviderType instance(String value) {
        for (HpcProviderType hpcProviderType : HpcProviderType.values()) {
            if (Objects.equals(hpcProviderType.value, value)) {
                return hpcProviderType;
            }
        }
        return null;
    }
}
